Storage systems may be implemented in electronic systems, such as computers, cell phones, hand-held electronic devices, etc. Some storage systems, such as solid state drives (SSDs), may include non-volatile memory devices. Non-volatile memory devices provide persistent data by retaining stored data when not powered and may include NAND flash memory, among other types of memory.
An SSD can be used, for example, to replace hard disk drives as the main storage volume for a computer due to advantages over hard disk drives in terms of performance, size, weight, ruggedness, operating temperature range, and power consumption. For instance, SSDs offer relatively good bandwidth and random I/O (input/output) performance along with a relatively good lifespan due to an absence of moving parts.
Various non-volatile memory devices of an SSD, such as NAND flash memory devices, can be organized in groups of cells that can be referred to as blocks. Each block can include physical pages. Read and write operations in the SSD may be performed at a page level; however, with NAND memory, erase operations typically may be performed at the block level such that overwriting (e.g., replacing) any page of data requires erasing the block in which the page resides. Generally, with NAND memory, rather than overwriting a page of a particular block, updated data can be written to “free” (e.g., erased) page of a different block and the page comprising the old data can be marked as an invalid page.
During operation of an SSD with NAND memory, a process referred to as “garbage collection” can be performed to maintain a free block pool. The free block pool can comprise blocks that contain free pages that are available for writing new data. The free blocks can be reclaimed from memory blocks that may be filled with both valid and invalid data. For example, valid data can refer to data corresponding to a page having a current (e.g., up to date) logical to physical mapping entry, and invalid data can refer to data corresponding to a page whose mapping entry is stale (e.g., the corresponding logical page has been remapped to a new physical page).
The garbage collection process can involve identifying a candidate block (e.g., a victim block) for reclaiming. Any valid pages (i.e., pages containing data that is not to be overwritten) residing in the candidate block are copied to another memory block, and the candidate block is erased, such that the candidate block becomes a free block that can be added to the free block pool. The garbage collection process requires read and write operations that results in write amplification, which can increase SSD power consumption and can decrease the lifespan of the SSD, for example, since the memory cells may become unusable after experiencing a certain number of program/erase cycles.